<html>
    <head>

    </head>
<body>
    <h1>ws</h1>

    <script>
        var url = "ws://192.168.85.111:9502";
        var wb = new WebSocket(url);

        wb.onopen = function(evt){
            wb.send("Hello , iam client \n");
            console.log('connected successfully');
        };

        wb.onmessage = function(evt){
            console.log('server return data'+evt.data);
        }

        wb.onclose = function(evt){
            console.log('close the connect');
        }
        wb.onerror = function(evt,e){
            console.log('Error occured: ' + evt.data);
        }
    </script>
</body>

</html>